import API from '@/network/request'

export default {
  /**
   * 用户登录
   * @param {*} data
   */
  userLogin(data) {
    return API({
      url: '/user/common/login',
      method: 'POST',
      data
    })
  },
  /**
   * 退出登录
   * @param {*} data
   */
  userLogout(data) {
    return API({
      url: '/user/oauth/logout',
      method: 'POST',
      data
    })
  },
  /**
   * 编辑头像
   * @param {*} data
   */
  editHeader(data) {
    return API({
      url: '/common/uploadHeaderOrgan',
      method: 'POST',
      data
    })
  },
  /**
   * 修改密码
   * @param {*} data
   */
  editPassword(data) {
    return API({
      url: '/user/oauth/modify/pwd',
      method: 'POST',
      data
    })
  },
  /**
   * @Description: domain抬头查询
   * @Param: domain
   * @return:
   * @Author: lhj@163.com
   * @Date: 2021/1/28
   */
  getDomain(data) {
    return API({
      url: '/organ/oms/domain',
      method: 'GET',
      params: data
    })
  },
  workOrderJump (data) {
    return API({
      url: '/workorder/jump',
      method: 'POST',
      data
    })
  }
}
